Add partial iOS support and fix most race-entry crashes#684
Add partial iOS support and fix most race-entry crashes#684ykr2byfrqb-wq wants to merge 12 commits intoHarbourMasters:mainfrom
Conversation
| } | ||
|
|
||
| std::vector<std::string> ListMods() { | ||
| const std::string main_path = Ship::Context::GetPathRelativeToAppDirectory(game_asset_file); |
There was a problem hiding this comment.
not sure about this change
There was a problem hiding this comment.
The changes in this file feel like feature changes to me.
Prefer if this sort of change was discussed in the PR description (here is fine now) as to why/what this improves. Separate PR best but not required.
coco875
left a comment
There was a problem hiding this comment.
maybe clean a bit more debug or make it a bit more general ?
| } | ||
| } | ||
| } | ||
| #ifndef __IOS__ |
There was a problem hiding this comment.
why it's needed ? can you add a comment
| } | ||
|
|
||
| void CM_TickEditor() { | ||
| #ifdef __IOS__ |
There was a problem hiding this comment.
seems like you disable editor for ios
| // Mobile: fallback to baserom.us.z64 | ||
| if (!foundGame && !std::filesystem::exists(Ship::Context::GetPathRelativeToAppDirectory("baserom.us.z64"))) { | ||
| SPDLOG_ERROR("baserom not found"); | ||
| // Mobile: fallback to baserom.us.z64 in the writable app directory. |
There was a problem hiding this comment.
hmm maybe would be better to use the system that search for a rom with the correct hash in a folder like on pc ?
|
Cleaned this up.
The |
aca32af to
f1222bb
Compare
| #define STACKSIZE 0x2000 | ||
| #else | ||
| #define STACKSIZE 0x10000 | ||
| #endif |
There was a problem hiding this comment.
revert, the stacks are unused
| } | ||
|
|
||
| std::vector<std::string> ListMods() { | ||
| const std::string main_path = Ship::Context::GetPathRelativeToAppDirectory(game_asset_file); |
There was a problem hiding this comment.
The changes in this file feel like feature changes to me.
Prefer if this sort of change was discussed in the PR description (here is fine now) as to why/what this improves. Separate PR best but not required.
|
|
||
| if (gEditor.IsEnabled()) { | ||
| gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir); | ||
| } |
| TrackSections* TrackSectionsClass::GetPointer() { | ||
| return TrackSectionsList.data(); | ||
| PointerData = TrackSectionsList; | ||
| PointerData.push_back({}); |
There was a problem hiding this comment.
Why the pushback of a blank array?
| std::vector<TrackSections> TrackSectionsList; | ||
|
|
||
| private: | ||
| std::vector<TrackSections> PointerData; |
There was a problem hiding this comment.
This is fine, but why is this change necessary?
Isn't it the same as TrackSectionsList?
| return Ship::Context::GetPathRelativeToAppDirectory(fmt::format("controllerPak_file_{}.sav", file_no)); | ||
| #else | ||
| return Ship::Context::GetPathRelativeToAppDirectory("controllerPak_file_" + std::to_string(file_no) + ".sav"); | ||
| #endif |
There was a problem hiding this comment.
Just wondering if we should just use the second variation for everything and remove the format.h include and the ifdef?
| "src/port/*.h" | ||
| "src/port/*.c" | ||
| "src/port/*.cpp" | ||
| "src/port/*.mm" |
| set(STORYBOARD_FILE ${IOS_DIR}/Launch.storyboard) | ||
| set(IMAGE_FILES ${IOS_DIR}/PoweredBy.png) | ||
| set(ICON_FILES ${IOS_DIR}/Icon.png) | ||
| set(ICON_FILES ${CMAKE_CURRENT_SOURCE_DIR}/icon.png) |
There was a problem hiding this comment.
why image files removed? Not used?
|
One idea for the editor stuff. I believe switch and android remove the editor (iirc). Since this also does not need the editor, we could
I'm also fine with the way it is for now. Perhaps change the define to IS_MOBILE or IS_HANDHELD_DEVICE or similar instead? I think editor tick/draw also tests for editor enabled in those functions (but I don't remember) |
|
The issue with the normal game assets not working was likely fixed in the latest lus version. |
|
and have been confirmed by the creator of the pr so it's not longer an issue |
Summary
This PR brings the current iOS work together into one source-only branch.
Right now, the practical workaround for the remaining track crashes is to install the official MK64 Reloaded SpaghettiKart
.o2rthrough the normalmodsfolder workflow on iPhone. With that mod in place, the current IPA works properly in on-device testing.This PR also includes the
libultrashipsubmodule update required for the iOS changes, but it does not include any ROM assets, Nintendo content, or bundled third-party mod files.iPhone Setup
.o2r.o2rfile intoSpaghettify/modson the iPhonemodsfolderBuild IPA
Prerequisites:
PATHBuild steps:
git clone --recurse-submodules <your-fork-or-branch-url>git submodule update --init --recursivebaserom.us.z64cmake -S . -B build-cmake -GNinjacmake --build build-cmake --target ExtractAssetsmk64.o2randspaghetti.o2rarchives from your own ROM datacmake -S . -B build-ios-make -DCMAKE_BUILD_TYPE=Release -DIOS=ON -DSIGN_LIBRARY=OFFcmake --build build-ios-make --config Releasemkdir -p build-ios-make/Payloadrm -rf build-ios-make/Payload/Spaghettify.appcp -R build-ios-make/Spaghettify.app build-ios-make/Payload/Spaghettify.apprm -f build-ios-make/SpaghettiKart-unsigned.ipazip -qry build-ios-make/SpaghettiKart-unsigned.ipa build-ios-make/Payloadbuild-ios-make/SpaghettiKart-unsigned.ipaAsset Notes
mk64.o2randspaghetti.o2rfilesbaserom.us.z64Current iOS status
modsfolderNotes